package com.oo.polymorphic_4.house;

/**
 * Building--${description}
 *
 * @author: Jovi
 * @createTime: 2017-05-09 17:50
 **/
public class Building extends House {
    private int level;

    public Building() {
    }

    public Building(String name, int price, String address, int area, int level) {
        super(name, price, address, area);
        this.level = level;
    }

    public void buy() {
        System.out.println("名称："
        +this.getName()+"\n价格："
        +this.getPrice()+"万元\n位置："
        +this.getAddress()+"\n面积："
        +this.getArea()+"平米\n楼层："
        +this.getLevel());
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }
}
